<template>
    <div :style="{height: '100%'}">
        <grid-table 
            :tablecolumns="tablecolumns" 
            :tabledata="tabledata" 
            :creatrouter="creatrouter" 
            :editrouter="editrouter"
            :showmodal="showmodal"
            :title="title"
            :width="width"
            :height="height"
            :fullscreen="fullscreen"
            :vuexnamespace="modalname"/>
    </div>
</template>
<script>
import GridTable from '@/components/GridTable/index'
import { mapState } from "vuex";

export default {
    name: 'VirtualBank',
    components: { GridTable },
    props:{
        width: Number,
        height: Number,
        callmodal: String
    },
    computed: {
        ...mapState('virtualbank',[
            'tablecolumns',
            'tabledata',
            'creatrouter',
            'editrouter',
            'title',
            'fullscreen',
            'showmodal'
        ])
    },
    created: function(){
        if(this.callmodal && this.callmodal == 'bank-sheet'){
            this.$store.dispatch('virtualbank/InitVirtualBank',{
                CreatRouter: '/bank/bank-sheet/virtualbank-sheet',
                EditRouter: '/bank/bank-sheet/virtualbank-sheet'
            })
        }else{
            this.$store.dispatch('virtualbank/InitVirtualBank',{
                CreatRouter: '/virtualbank/virtualbank-sheet',
                EditRouter: '/virtualbank/virtualbank-sheet'
            })
        }
        
    },
    methods: {
        
       
    },
    data() {
        return {
            modalname: "virtualbank"
        }
    }
}
</script>
<style scoped>

</style>